﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MultithreadFileCopy
{
    public class MultithreadFileCopyErrorArgs
    {
        public string Error { get; set; }
        public string Description { get; set; }
    }
    public delegate void MultithreadFileCopyErrorHandler(object sender, MultithreadFileCopyErrorArgs e);

    public class ProgressReportArgs
    {
        public int CurrentFile { get; set; }
        public int TotalFiles { get; set; }

        public string Source { get; set; }
        public string Destination { get; set; }

        public long CompletedBytes { get; set; }
        public long TotalBytes { get; set; }

        public long FileCompletedBytes { get; set; }
        public long FileTotalBytes { get; set; }

        public int FileProgress
        {
            get
            {
                return (int)(FileCompletedBytes * 100 / FileTotalBytes);
            }
        }
        public int OverallProgress
        { get { return (int)(CompletedBytes * 100 / TotalBytes); } }
    }
    public delegate void ProgressReportHandler(object sender, ProgressReportArgs e);

    public delegate void ProcessCompletedHandler(object sender, List<MultithreadFile> e);
    public delegate void Noargs();
}
